package com.ruoyi.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.web.domain.MonitorArea;
import com.ruoyi.web.domain.dto.MonitorAreaDto;
import com.ruoyi.web.domain.vo.MonitorAreaTreeVo;
import com.ruoyi.web.domain.vo.MonitorAreaVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface MonitorAreaMapper extends BaseMapper<MonitorArea> {

    List<MonitorAreaTreeVo> selectTreeVoList(@Param("dto") MonitorAreaDto dto);

    List<MonitorAreaTreeVo> selectCameraTreeVoList(@Param("dto") MonitorAreaDto dto);

    MonitorAreaVo selectDetails(@Param("baseId") Long baseId);

    List<MonitorAreaVo> selectAreaList(@Param("dto") MonitorAreaDto dto);

    Map<String, Integer> selectAllCamerasCount();

    String getSourceNameByCameraId(@Param("cameraId") Long cameraId);
}
